"""
Core component interfaces for the continual learning framework.

This module defines the foundational interfaces that all framework components
must implement, establishing a clean separation between interface definitions
and concrete implementations.
"""

from abc import ABC
from typing import Any, Dict


class ComponentInterface(ABC):
    """
    Base interface for all registerable components in the framework.

    All framework components that can be registered and discovered
    through the registry system should inherit this interface.
    """

    def __init__(self, *args, **kwargs):
        """
        Initialize the component with any necessary arguments.

        This constructor can be extended by subclasses to accept
        additional parameters as needed.
        """
        super().__init__()

    @classmethod
    def get_registry_info(cls) -> Dict[str, Any]:
        """
        Get registry metadata for this component.

        This method provides standardized access to registration metadata,
        facilitating component discovery and instantiation.

        Returns:
            Dict with registry metadata including registered name and registries
        """
        if hasattr(cls, "__registry_info__"):
            return getattr(cls, "__registry_info__")
        return {"name": cls.__name__, "registries": []}
